package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpShopUserRelProductDetailDTO;
import com.financing.wap.dao.IFpShopUserRelProductDetailDao;
import com.financing.wap.common.SqlName;
/**
 * fp_shop_user_rel_product_detail  
 *  数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopUserRelProductDetailDao")
public class FpShopUserRelProductDetailDaoImpl extends BaseDaoImpl<FpShopUserRelProductDetailDTO, java.lang.Integer> implements IFpShopUserRelProductDetailDao {


	@Override
	public int insert(FpShopUserRelProductDetailDTO fpShopUserRelProductDetail) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopUserRelProductDetailSql.insert, fpShopUserRelProductDetail);
	}

	@Override
	public void update(FpShopUserRelProductDetailDTO fpShopUserRelProductDetail) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopUserRelProductDetailSql.update, fpShopUserRelProductDetail);
	}

	@Override
	public void updateForce(FpShopUserRelProductDetailDTO fpShopUserRelProductDetail) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopUserRelProductDetailSql.updateForce, fpShopUserRelProductDetail);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopUserRelProductDetailSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopUserRelProductDetailDTO> queryList(FpShopUserRelProductDetailDTO fpShopUserRelProductDetail) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopUserRelProductDetailSql.queryList, fpShopUserRelProductDetail);
	}

	@Override
	public int queryListCount(FpShopUserRelProductDetailDTO fpShopUserRelProductDetail) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopUserRelProductDetailSql.queryListCount, fpShopUserRelProductDetail);
	}

	@Override
	public FpShopUserRelProductDetailDTO loadById(Integer id) throws SQLException {
		return  (FpShopUserRelProductDetailDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopUserRelProductDetailSql.loadById,id);
	}

	@Override
	public Class<FpShopUserRelProductDetailDTO> getEntityClass() {
		return FpShopUserRelProductDetailDTO.class;
	}
 	
}
